<template>
    <div class="user">
        <userHeader></userHeader>
        <user-order></user-order>
        <user-module style="margin-top: 3vh"></user-module>
    </div>
</template>

<script>
    import userHeader from './tabbar-user-header.vue'
    import userOrder from './tabbar-user-order.vue'
    import UserModule from "./tabbar-user-module";
    import {ApiService} from "../../axios/apiService";
    const isLogin = new ApiService("/outLogin");
    export default {
        props: {
        },
        components:{
            UserModule,
            userHeader:userHeader,
            userOrder:userOrder
        },
        data(){
            return{

            }
        },
        mounted() {
            this.isLogin()
        },
        methods:{
            isLogin(){/*判断是否登录，未登录则跳转到登录界面*/
                console.log("进来了")
                if(!isLogin.getCookie("userid")){
                    this.$router.push('login');
                }
            }
        }
    };
</script>
